package dmmm.shemes;


import java.awt.Point;
import java.util.ArrayList;

import dmmm.gui.GuiLabel;
import dmmm.gui.GuiLine;
import dmmm.gui.GuiScheme;

public class Mem {

    private static GuiScheme gui;

    public static GuiScheme getGui() {
        return gui;
    }

    public static void init() {
    }

    public static void connect() {
    }

    public static void gui() {
        GuiLine line; // Pomocna promenljiva
        gui = new GuiScheme("dmmm/dmmm/images/MEM.png");
        ArrayList<ArrayList<Point>> sections;
        ArrayList<Point> points;


        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(157, 54));
        points.add(new Point(451, 54));
        sections.add(points);
        points = new ArrayList<Point>();
        points.add(new Point(157, 56));
        points.add(new Point(451, 56));
        sections.add(points);
        line = new GuiLine(sections, Bus1.ABUS());
        gui.addLine(line);
        
        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(157, 91));
        points.add(new Point(451, 91));
        sections.add(points);
        points = new ArrayList<Point>();
        points.add(new Point(157, 93));
        points.add(new Point(451, 93));
        sections.add(points);
        line = new GuiLine(sections, Bus1.DBUS());
        gui.addLine(line);
        
        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(158, 128));
        points.add(new Point(450, 128));
        sections.add(points);
        line = new GuiLine(sections, Bus1.NOTRDBUS());
        gui.addLine(line);
        
        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(158, 147));
        points.add(new Point(450, 147));
        sections.add(points);
        line = new GuiLine(sections, Bus1.NOTWRBUS());
        gui.addLine(line);
        
        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(158, 165));
        points.add(new Point(450, 165));
        sections.add(points);
        line = new GuiLine(sections, Bus1.NOTFCBUS());
        gui.addLine(line);
        
        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(322, 57));
        points.add(new Point(322, 201));
        sections.add(points);
        points = new ArrayList<Point>();
        points.add(new Point(324, 57));
        points.add(new Point(324, 201));
        sections.add(points);
        line = new GuiLine(sections, Bus1.ABUS());
        gui.addLine(line);
        
        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(349, 94));
        points.add(new Point(349, 201));
        sections.add(points);
        points = new ArrayList<Point>();
        points.add(new Point(351, 94));
        points.add(new Point(351, 201));
        sections.add(points);
        line = new GuiLine(sections, Bus1.DBUS());
        gui.addLine(line);
        
        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(378, 201));
        points.add(new Point(378, 129));
        sections.add(points);
        line = new GuiLine(sections, Bus1.NOTRDBUS());
        gui.addLine(line);
        
        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(396, 201));
        points.add(new Point(396, 148));
        sections.add(points);
        line = new GuiLine(sections, Bus1.NOTWRBUS());
        gui.addLine(line);
        
        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(414, 166));
        points.add(new Point(414, 201));
        sections.add(points);
        line = new GuiLine(sections, Bus1.NOTFCBUS());
        gui.addLine(line);

        //LABELE:
        gui.addLabel(new GuiLabel(230, 51, Bus1.ABUS()));
        gui.addLabel(new GuiLabel(230, 88, Bus1.DBUS()));
    }
}
